package com.fanhao.greendao;


import de.greenrobot.daogenerator.DaoGenerator;
import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Schema;

public class GreenDao {

    public static void main(String[] args) {
        Schema schema = new Schema(1000,
                "com.fanhao.dllo.justforyou.entity.greendao");
        addNote(schema);

        try {
            new DaoGenerator().generateAll(schema,
                   "./JustForYou/src/main/java" );
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private static void addNote(Schema schema) {
        Entity entity = schema.addEntity("PersonEntity");
        entity.addLongProperty("id").primaryKey();
        entity.addStringProperty("name");
        entity.addStringProperty("psw");
    }
}
